Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not so dumb cursor copy #7040

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Not so dumb cursor copy #7040

wants to merge 7 commits into from

Conversation

UjinT34
Copy link
Contributor

@UjinT34 UjinT34 commented Jul 25, 2024

Describe your PR, what does it fix/add?

  • Adds support for dumb buffers with cursor:allow_dumb_copy = true.
  • Adds cursor:allow_slow_copy

With cursor:allow_slow_copy = true creates an additional renderable swapchain if rendering to cursor swapchain fails. Renders to this swapchain buffer and copies the result to main cursor swapchain.

Is there anything you want to mention? (unchecked code, possible bugs, found problems, breaking compatibility, etc.)

I don't really know what I am doing here %) Some bits might be totally wrong. But this works for me and doesn't seem to cause any issues.
This code skips many sanity checks because it assumes that fallback buffer will get the same size and format as the main one.

Is it ready for merging, or does it need work?

Requires hyprwm/aquamarine#31

@vaxerski
Copy link
Member

vaxerski commented Jul 25, 2024

If we want to have as little lag as possible on nvidia, we should make aquamarine support drm_dumb (cpu) buffers for planes (probably only cursor, doing that for primary is sacrilege) and then use the cpu to render the pointer.

32x32 or even 64x64 cursors with memcpy should not lag at all.

We don't do anything to the cursors that would benefit massively from a gpu (transforms, etc)

Some plugins do, but it's better to fix the experience for 99% of users and worry about plugins for 1% later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants